// /////////////////////////////////////////////////////////////////////////////
//
// Name:            asGameState.h
// Author:          Michael Bartsch (ZCCdark203)
//
// Desc :           Binds the GameState class to AngelScript
//
// License:         Copyright (C) 2009 Michael Bartsch and Contributors
//
//                  This program is free software: you can redistribute it
//                  and/or modify it under the terms of the zlib/libpng License.
//                  See main.cpp for conditions of distribution and use.
//
// /////////////////////////////////////////////////////////////////////////////

#ifndef __ASGAMESTATE_H__
#define __ASGAMESTATE_H__

// Include files
#include "../../dependencies.h"

#ifdef __COMPILE_WITH_ANGELSCRIPT__

#include "../../core/GameState.h"


// ScriptedGameState class
//! A class derived from GameState, which makes it possible to interact with classes derived from
//! GameState within AngelScript.
//! @note For internal use only!
class ScriptedGameState : public GameState
{
public:

    // Initialisation, deinitialisation and control...
    ScriptedGameState(asIScriptObject *object);
    virtual ~ScriptedGameState();

    void init();
    void clear();

    void update(f32 deltaTime);
    void render();

private:

    // Private members
    asIScriptObject *mObject;
    asIScriptContext *mContext;

};

//! Binds the GameState class to AngelScript.
extern void bindGameState(asIScriptEngine *engine);

#endif // __COMPILE_WITH_ANGELSCRIPT__

#endif

